package com.wp.common.enums;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * 自定义异常枚举
 *
 * @author wp
 * @create 2019-03-03 11:48
 */
@NoArgsConstructor
@AllArgsConstructor
public enum ExceptionEnum {
    USERNAME_CANNOT_BE_NULL(404, "用户名不能为空"),
    PASSWORD_CANNOT_BE_NULL(404, "密码不能为空"),
    CAPTCHA_CANNOT_BE_NULL(404, "验证码不能为空"),
    USER_NOT_FOUND(404, "用户不存在"),
    PASSWORD_NOT_RIGHT(404, "密码不正确"),
    INVILID_USER(400, "用户已锁定"),
    INVALID_TOKEN(401, "token无效"),
    ;
    int value;
    String message;

    public int value() {
        return this.value;
    }

    public String message() {
        return this.message;
    }
}
